package com.hex.campus.backend.hex_campus_backend.repository;

import com.hex.campus.backend.hex_campus_backend.entity.Book;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BookRepository extends JpaRepository<Book, Long> {
    List<Book> findByTitleContaining(String keyword);
    List<Book> findByUserId(Long userId); // 根据用户 ID 查询教材
}